def t1111():
  """Strategy t111: """
  CfgCDN1.LoadStrategy(CfgRouter, "t111")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)
  
def t1112():
  """Strategy t111: """
  CfgCDN1.LoadStrategy(CfgRouter, "t111")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  Ag1.SetReady(ACD1)
  UniversalRoutingServer.TestValue( receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)  
  
def t1113():
  """Strategy t111: """
  CfgCDN1.LoadStrategy(CfgRouter, "t111")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  LocalTserver.MakeCall(DN11.number, CDN1.number)
  LocalTserver.Wait(DN11.number)  
  Ag1.SetReady(ACD1)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN11.number], timeout = 30)
  UniversalRoutingServer.TestValue( receiver, DN1.number, "Call was delivered to the wrong destination")  
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  UniversalRoutingServer.TestValue( receiver, DN1.number, "Call was delivered to the wrong destination")   
  LocalTserver.ReleaseCall(DN11.number)
  LocalTserver.Wait()  
  CfgCDN1.UnloadStrategy(CfgRouter)  
  
def t1121():
  """Strategy t112: """
  CfgCDN1.LoadStrategy(CfgRouter, "t112")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)
  
  
def t1122():
  """Strategy t112: """
  CfgCDN1.LoadStrategy(CfgRouter, "t112")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  Ag1.SetReady(ACD1)
  UniversalRoutingServer.TestValue(receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)        
  
def t1123():
  """Strategy t112: """
  CfgCDN1.LoadStrategy(CfgRouter, "t112")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  LocalTserver.MakeCall(DN11.number, CDN1.number)
  LocalTserver.Wait(DN11.number)  
  Ag1.SetReady(ACD1)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN11.number], timeout = 30)
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")  
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")   
  LocalTserver.ReleaseCall(DN11.number)
  LocalTserver.Wait()  
  CfgCDN1.UnloadStrategy(CfgRouter)    
  
  
def t1131():
  """Strategy t113: """
  CfgCDN1.LoadStrategy(CfgRouter, "t113")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)
  
  
def t1132():
  """Strategy t113: """
  CfgCDN1.LoadStrategy(CfgRouter, "t113")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  Ag1.SetReady(ACD1)
  UniversalRoutingServer.TestValue(receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)        
  
def t1133():
  """Strategy t113: """
  CfgCDN1.LoadStrategy(CfgRouter, "t113")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  LocalTserver.MakeCall(DN11.number, CDN1.number)
  LocalTserver.Wait(DN11.number)  
  Ag1.SetReady(ACD1)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN11.number], timeout = 30)
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")  
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  UniversalRoutingServer.TestValue( receiver, DN1.number, "Call was delivered to the wrong destination")   
  LocalTserver.ReleaseCall(DN11.number)
  LocalTserver.Wait()  
  CfgCDN1.UnloadStrategy(CfgRouter)      
  
def t1141():
  """Strategy t114: """
  CfgCDN1.LoadStrategy(CfgRouter, "t114")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)
  
  
def t1142():
  """Strategy t114: """
  CfgCDN1.LoadStrategy(CfgRouter, "t114")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  Ag1.SetReady(ACD1)
  UniversalRoutingServer.TestValue( receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)        
  
def t1143():
  """Strategy t114: """
  CfgCDN1.LoadStrategy(CfgRouter, "t114")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  LocalTserver.MakeCall(DN11.number, CDN1.number)
  LocalTserver.Wait(DN11.number)  
  Ag1.SetReady(ACD1)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN11.number], timeout = 30)
  UniversalRoutingServer.TestValue( receiver, DN1.number, "Call was delivered to the wrong destination")  
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  UniversalRoutingServer.TestValue( receiver, DN1.number, "Call was delivered to the wrong destination")   
  LocalTserver.ReleaseCall(DN11.number)
  LocalTserver.Wait()  
  CfgCDN1.UnloadStrategy(CfgRouter)        
  
def t1151():
  """Strategy t115: """
  CfgCDN1.LoadStrategy(CfgRouter, "t115")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.WaitAlert(ACD1.number, "Queued")
  UniversalRoutingServer.TestValue(receiver, ACD1.number, "Call was delivered to the wrong destination")  
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  CfgCDN1.UnloadStrategy(CfgRouter)  
  
# def t1152():
#   """Strategy t115: """
#   CfgCDN1.LoadStrategy(CfgRouter, "t115")
#   Ag1.SetNotReady(ACD1)
#   Ag2.SetNotReady(ACD1)
#   LocalTserver.MakeCall(DN10.number, CDN1.number)
#   LocalTserver.Wait(DN10.number)
#   receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
#     DN12.number], timeout = 30)
#   time.sleep(2) #
#   LocalTserver.ReleaseCall(DN10.number)
#   LocalTserver.Wait()                                                                  
#   Ag1.SetReady(ACD1)
#   Ag2.SetReady(ACD2)
#   UniversalRoutingServer.TestValue( receiver, DN12.number, "Call was delivered to the wrong destination")
#   CfgCDN1.UnloadStrategy(CfgRouter) 

def t1171():
  """Strategy t117: """
  CfgCDN1.LoadStrategy(CfgRouter, "t117")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)        
  
def t1172():
  """Strategy t117: """
  CfgCDN1.LoadStrategy(CfgRouter, "t117")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  Ag1.SetReady(ACD1)
  UniversalRoutingServer.TestValue( receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)  
  
def t1173():
  """Strategy t117: """
  CfgCDN1.LoadStrategy(CfgRouter, "t117")
  Ag1.SetNotReady(ACD1)
  LocalTserver.MakeCall(DN10.number, CDN1.number)
  LocalTserver.Wait(DN10.number)
  LocalTserver.MakeCall(DN11.number, CDN1.number)
  LocalTserver.Wait(DN11.number)  
  Ag1.SetReady(ACD1)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN11.number], timeout = 30)
  UniversalRoutingServer.TestValue( receiver, DN1.number, "Call was delivered to the wrong destination")  
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  UniversalRoutingServer.TestValue( receiver, DN1.number, "Call was delivered to the wrong destination")   
  LocalTserver.ReleaseCall(DN11.number)
  LocalTserver.Wait()  
  CfgCDN1.UnloadStrategy(CfgRouter)    
  
